/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class MessageStatusPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_MESSAGE_STATUS")
    private BigInteger idMessageStatus;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_MESSAGE")
    private BigInteger idMessage;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_PERSONAL_INFO")
    private BigInteger idPersonalInfo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_BRANCHENTERPRISE")
    private BigInteger idBranchenterprise;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ENTERPRISE")
    private BigInteger idEnterprise;

    public MessageStatusPK() {
    }

    public MessageStatusPK(BigInteger idMessageStatus, BigInteger idMessage, BigInteger idPersonalInfo, BigInteger idBranchenterprise, BigInteger idEnterprise) {
        this.idMessageStatus = idMessageStatus;
        this.idMessage = idMessage;
        this.idPersonalInfo = idPersonalInfo;
        this.idBranchenterprise = idBranchenterprise;
        this.idEnterprise = idEnterprise;
    }

    public BigInteger getIdMessageStatus() {
        return idMessageStatus;
    }

    public void setIdMessageStatus(BigInteger idMessageStatus) {
        this.idMessageStatus = idMessageStatus;
    }

    public BigInteger getIdMessage() {
        return idMessage;
    }

    public void setIdMessage(BigInteger idMessage) {
        this.idMessage = idMessage;
    }

    public BigInteger getIdPersonalInfo() {
        return idPersonalInfo;
    }

    public void setIdPersonalInfo(BigInteger idPersonalInfo) {
        this.idPersonalInfo = idPersonalInfo;
    }

    public BigInteger getIdBranchenterprise() {
        return idBranchenterprise;
    }

    public void setIdBranchenterprise(BigInteger idBranchenterprise) {
        this.idBranchenterprise = idBranchenterprise;
    }

    public BigInteger getIdEnterprise() {
        return idEnterprise;
    }

    public void setIdEnterprise(BigInteger idEnterprise) {
        this.idEnterprise = idEnterprise;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMessageStatus != null ? idMessageStatus.hashCode() : 0);
        hash += (idMessage != null ? idMessage.hashCode() : 0);
        hash += (idPersonalInfo != null ? idPersonalInfo.hashCode() : 0);
        hash += (idBranchenterprise != null ? idBranchenterprise.hashCode() : 0);
        hash += (idEnterprise != null ? idEnterprise.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MessageStatusPK)) {
            return false;
        }
        MessageStatusPK other = (MessageStatusPK) object;
        if ((this.idMessageStatus == null && other.idMessageStatus != null) || (this.idMessageStatus != null && !this.idMessageStatus.equals(other.idMessageStatus))) {
            return false;
        }
        if ((this.idMessage == null && other.idMessage != null) || (this.idMessage != null && !this.idMessage.equals(other.idMessage))) {
            return false;
        }
        if ((this.idPersonalInfo == null && other.idPersonalInfo != null) || (this.idPersonalInfo != null && !this.idPersonalInfo.equals(other.idPersonalInfo))) {
            return false;
        }
        if ((this.idBranchenterprise == null && other.idBranchenterprise != null) || (this.idBranchenterprise != null && !this.idBranchenterprise.equals(other.idBranchenterprise))) {
            return false;
        }
        if ((this.idEnterprise == null && other.idEnterprise != null) || (this.idEnterprise != null && !this.idEnterprise.equals(other.idEnterprise))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.MessageStatusPK[ idMessageStatus=" + idMessageStatus + ", idMessage=" + idMessage + ", idPersonalInfo=" + idPersonalInfo + ", idBranchenterprise=" + idBranchenterprise + ", idEnterprise=" + idEnterprise + " ]";
    }

}
